﻿#r @"..\Microsoft.SharePoint.Client (spo)\Microsoft.SharePoint.Client.dll"
#r @"..\Microsoft.SharePoint.Client (spo)\Microsoft.SharePoint.Client.Runtime.dll"

#load "Client.fs"

open Client
open Microsoft.SharePoint.Client
open Microsoft.SharePoint.Client.Application
open System.Security;

// =======================================================
// Set site collection admins
// =======================================================

let usr = Client.Context.Web.EnsureUser("me@geek.onmicrosoft.com")
Client.Load usr

usr.IsSiteAdmin

usr.IsSiteAdmin <- true
usr.Update()
Client.ExecuteQuery()
